import request from '@/utils/request'

export function getDepartments() {
  return request.get('api/company/department')
}
export function getHeadInfo() {
  return request.get('api/sys/user/simple')
}
export function addDepartments(data) {
  return request({
    url: 'api/company/department',
    method: 'post',
    data
  })
}
export function delDepartments(id) {
  return request.delete(`api/company/department/${id}`)
}
export function EditDepartments(id) {
  return request.get(`api/company/department/${id}`)
}
// 提交添加
export function EditDepartmentsList(data) {
  return request.put(`api/company/department/${data.id}`, data)
}
